<?php

declare(strict_types=1);

/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

use Hyperf\HttpServer\Router\Router;

Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');

Router::get('/favicon.ico', function () {
    return '';
});


Router::get('/goldbean/public/price/listHourly', 'App\Controller\PriceController@listHourly');
Router::get('/goldbean/public/price/listDaily', 'App\Controller\PriceController@listDaily');
Router::get('/goldbean/public/price/listWeekly', 'App\Controller\PriceController@listWeekly');
Router::get('/goldbean/public/price/listMonthly', 'App\Controller\PriceController@listMonthly');
Router::get('/goldbean/public/price/getPrice', 'App\Controller\PriceController@getPrice');
Router::get('/goldbean/public/price/getPriceInfo', 'App\Controller\PriceController@getPriceInfo');

Router::get('/goldbean/public/bill/countIncomeCategory', 'App\Controller\HscoinController@countIncomeCategory');
Router::get('/goldbean/public/bill/countExpenseCategory', 'App\Controller\HscoinController@countExpenseCategory');
Router::get('/goldbean/public/balance/getMine', 'App\Controller\HscoinController@getMine');

Router::post('/goldbean/admin/conf/setAppEnabled', 'App\Controller\ConfController@setAppEnabled');
Router::get('/goldbean/admin/conf/getAppEnabled', 'App\Controller\ConfController@getAppEnabled');
Router::post('/goldbean/admin/conf/store', 'App\Controller\ConfController@store');
Router::get('/goldbean/admin/conf/getConf', 'App\Controller\ConfController@getConf');

Router::get('/goldbean/public/bill/getBalance', 'App\Controller\HscoinController@getBalance');
Router::get('/goldbean/admin/bill/getList', 'App\Controller\HscoinController@getList');
Router::post('/goldbean/user/exchangeMoney', 'App\Controller\HscoinController@exchangeMoney');
Router::get('/goldbean/admin/bill/listBill', 'App\Controller\HscoinController@listBill');
Router::get('/goldbean/admin/bill/listUser', 'App\Controller\HscoinController@listBalance');
Router::get('/goldbean/public/getStats', 'App\Controller\HscoinController@getStats');

Router::post('/goldbean/changeByHscoin', 'App\Controller\PriceController@changeByHscoin');
Router::post('/goldbean/changeByFund', 'App\Controller\PriceController@changeByFund');
Router::post('/goldbean/bill/add', 'App\Controller\HscoinController@add');
Router::post('/goldbean/bill/cancel', 'App\Controller\HscoinController@cancel');

Router::post('/sxtest', 'App\Controller\IndexController@sxtest');